import type { PermissionResult } from '@/api/admin/model/permissionModel';
import { request } from '@/utils/request';

const Api = {
  PermissionQuery: '/admin.permission/query',
  PermissionSave: '/admin.permission/save',
  PermissionDelete: '/admin.permission/delete',
};

export function getPermission(data: any) {
  return request.post<PermissionResult>({
    url: Api.PermissionQuery,
    params: data,
  });
}

export function savePermission(data: any) {
  return request.post({
    url: Api.PermissionSave,
    params: data,
  });
}

export function deletePermission(data: any) {
  return request.post({
    url: Api.PermissionDelete,
    params: data,
  });
}
